// 调出外链
function payForOthers(options) {
    if (!options) {
        return
    }
    let { success, error, url, title, content, imageurl, className } = options

    success = success ? success : () => {}
    error = error ? error : () => {}
    imageurl = imageurl ? imageurl : ""
    className = className ? className : ""

    if (title === undefined) {
        alert('调用外链方法title必填')
        return
    }
    if (content === undefined) {
        alert('调用外链方法content必填')
    }
    const opts = {
        "title": title,
        "content": content,
        "url": url,
        "imageurl":imageurl
    }
    cordova.exec(success, error, "SharePlugin", "start",[className, url, opts])
}

export default payForOthers